This invention relates generally to shared databases, more particularly, relates to a method of updating a shared database in a computer network.
Servers on computer networks often share what is known as a xe2x80x9cmulti-masterxe2x80x9d database in which the servers all share responsibility for keeping the data current. Copies of parts or all of the database may be stored on several servers in such a system. When one server makes a change to a portion of the database, that change needs to be transmitted to all of the other servers that possess copies of that portion. One method of ensuring that this update occurs is described in U.S. Pat. No. 5,832,225 which is incorporated by reference herein in its entirety.
When a network that uses a multi-master database grows large, it becomes difficult to update current copies of the database on the servers within a reasonable period of time. This is due to the large number of xe2x80x9chopsxe2x80x9d (trips from one server to another) a between servers a particular change might have to make before it filters through the entire network. Under current updating schemes, if a server in a network of N servers makes a single change to the database, the server must transmit that change to Nxe2x88x921 servers. Thus, if all of the servers are making changes, a total of N*(Nxe2x88x921) updates must occur, thereby generating a tremendous amount of network traffic. The additional traffic can slow down the process considerably, thereby causing inconvenience to users and administrators alike. For example, if a user logs on to one server in a network and changes his password, he may not be able to use this password on another network server until the following day. Thus it can be seen that there is a need for a more efficient method for updating a multi-master database on a computer network.
In accordance with this need, a Knowledge Consistency Checker (KCC) that periodically executes on each server of the computer network is provided. The KCC interacts with a data structure contained within a copy of a database located on each server, and with a replication program that executes on each server when called by the KCC. The data structure contains a list of server objects representing the servers in the network. Associated with each server object is a list of replication objects that describe how the server is to obtain a copy of a change to the database. Each replication object represents a server other than the server with which it is associated. The KCC uses the replication objects to inform the replication engine from which servers to periodically request an update to the database and to the data structure. Thus, while each KCC is only responsible for creating the objects required for its own server, the replication topology of the entire network is provided to every server in the network by the periodic requests.
To ensure that all of the servers in the network receive all of the database changes, the KCC uses the Globally Unique IDs (GUIDs) to map out a virtual ring that creates a continuous path through all of the servers. When the KCC executes on a server, it orders the server objects in the replication map according to their GUIDs. The KCC then finds its server in the list and creates a replication object to the server ahead of it and a replication object to the server following it, and stores these objects under the server""s object.